Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NavigationActivation prototype #42873

Merged
merged 1 commit into from
Nov 7, 2023
Merged

NavigationActivation prototype #42873

merged 1 commit into from
Nov 7, 2023

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Oct 31, 2023

NavigationActivation is a new object (exposed as
navigation.activation). It is updated when a new Document is
"activated": initial Document creation, restore from bfcache, or
(in a future CL) prerender activation. It has three pieces of state:

  • activation.entry: The current NavigationHistoryEntry at the time
    of activation.
  • activation.from: The current NavigationHistoryEntry immediately
    before activation (i.e., the entry we came from). This will be
    null if the navigation was cross-origin, or if the previous entry
    was not in the same-origin contiguous region of the back/forward
    list that is available in navigation.entries().
  • activation.navigationType: The navigationType ('push', 'replace',
    'reload', or 'traverse') of the navigation that activated the
    current Document.

Note that entry or from may be a NavigationHistoryEntry that is
no longer present in navigation.entries() (e.g., when doing a
replace navigation, activation.from will be the replaced entry).
In that case, the entry will remain visible, but because it is
a "disposed" entry, its index will be -1 and attempting to
navigation.traverseTo() its key will be rejected.

Initial discussion: whatwg/html#9760
Draft spec PR: whatwg/html#9856
I2p: https://groups.google.com/a/chromium.org/g/blink-dev/c/EfqxeH3Iwh4

Bug: 1492932
Change-Id: I2e090a8366906e4cb6778893ad9ffdca18d6ec37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4990011
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1220983}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4990011 branch 8 times, most recently from f531992 to c40447f Compare November 7, 2023 00:28
NavigationActivation is a new object (exposed as
`navigation.activation`). It is updated when a new Document is
"activated": initial Document creation, restore from bfcache, or
(in a future CL) prerender activation. It has three pieces of state:
* `activation.entry`: The current NavigationHistoryEntry at the time
  of activation.
* `activation.from`: The current NavigationHistoryEntry immediately
  before activation (i.e., the entry we came from). This will be
  null if the navigation was cross-origin, or if the previous entry
  was not in the same-origin contiguous region of the back/forward
  list that is available in `navigation.entries()`.
* `activation.navigationType`: The navigationType ('push', 'replace',
  'reload', or 'traverse') of the navigation that activated the
  current Document.

Note that `entry` or `from` may be a NavigationHistoryEntry that is
no longer present in `navigation.entries()` (e.g., when doing a
replace navigation, `activation.from` will be the replaced entry).
In that case, the entry will remain visible, but because it is
a "disposed" entry, its index will be -1 and attempting to
`navigation.traverseTo()` its key will be rejected.

Initial discussion: whatwg/html#9760
Draft spec PR: whatwg/html#9856
I2p: https://groups.google.com/a/chromium.org/g/blink-dev/c/EfqxeH3Iwh4

Bug: 1492932
Change-Id: I2e090a8366906e4cb6778893ad9ffdca18d6ec37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4990011
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Commit-Queue: Nate Chapin <japhet@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1220983}
@sj0602
Copy link
Contributor

sj0602 commented Nov 7, 2023

Test failed due to this change:

Unstable results

Test Subtest Results Messages
/navigation-api/navigation-activation/activation-after-bfcache-cross-origin.html   OK: 9/10, TIMEOUT: 1/10  
/navigation-api/navigation-activation/activation-after-bfcache-cross-origin.html navigation.activation must be updated when restored from bfcache FAIL: 9/10, TIMEOUT: 1/10 Test timed out;promise_test: Unhandled rejection with value: object "Error: navigation is not defined"

@sj0602
Copy link
Contributor

sj0602 commented Nov 7, 2023

Create https://bugs.chromium.org/p/chromium/issues/detail?id=1500442 to track this issue.

@KyleJu KyleJu merged commit c2ca6eb into master Nov 7, 2023
19 of 21 checks passed
@KyleJu KyleJu deleted the chromium-export-cl-4990011 branch November 7, 2023 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants